package edu.sctu.practice.class02.yangyiqing.exam.test02;

/**
 * Created by Administrator on 2015/10/9 0009.
 */
public class VehicleMain {

    //最后在测试类Vehicle中的main()中实例化一个交通工具对象，并通过方法给它初始化speed,size的值，并且通过打印出来。
    // 另外，调用加速，减速的方法对速度进行改变。


    public static void main(String[] args) {

        Vehicle vehicle = new Vehicle();
        vehicle.speed = 120;
        vehicle.size = 4;
        vehicle.brand = "Lincs";
        vehicle.type = "limo";


        vehicle.speedUp();
        vehicle.speedUp();

        vehicle.speedDown();


        System.out.println("Speed="+vehicle.speed+"  size="+vehicle.size+"  brand="+vehicle.brand+" type="+vehicle.type);

    }
}
